package com.example.module_d;

import android.content.Context;
import android.content.SharedPreferences;

public class SpUtil {

//    private static SharedPreferences sp =  getSharedPreferences("config", Context.MODE_PRIVATE);

    public static String getValue(Context context,String key){

        SharedPreferences sp =  context.getSharedPreferences("config", Context.MODE_PRIVATE);
        String value = sp.getString(key,"");


        return value;
    }
    public static void putValue(Context context,String key,String value){
        SharedPreferences sp =  context.getSharedPreferences("config", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sp.edit();
        editor.putString(key,value);
        editor.commit();
    }

}
